"""oauth URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('help/', include('help.urls'))
"""
from django.conf.urls import url
from oauth2_provider.views import ApplicationList, ApplicationDetail, ApplicationRegistration, ApplicationUpdate, \
	ApplicationDelete

import management.views as management_views

urlpatterns = [
	url('homepage', management_views.ManagementList.as_view(), name='management_homepage'),
	url('detail/(?P<pk>[\w-]+)', ApplicationDetail.as_view(template_name='management/detail.html'), name='management_detail'),
	url("create", management_views.ManagementRegistration.as_view(template_name='management/create.html'), name="management_create"),
	url("update/(?P<pk>[\w-]+)", management_views.ManagementUpdate.as_view(template_name='management/update.html'), name="management_update"),
	url("delete/(?P<pk>[\w-]+)", management_views.ManagementDelete.as_view(template_name='management/delete.html'), name="management_delete"),
]
